﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ProfileType.cs" company="DissingNellemann">
//   
// All rights reserved </copyright>
// <summary>
//   The profile type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Website.Models.Domain
{
    using Website.Models.Base;

    /// <summary>
    ///     The profile type.
    /// </summary>
    public class ProfileType : Entity
    {
        #region Public Properties

        /// <summary>
        ///     Gets or sets the name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///     Gets or sets the sector.
        /// </summary>
        public ProfileSector Sector { get; set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The convert.
        /// </summary>
        /// <param name="dto">
        /// The dto.
        /// </param>
        /// <returns>
        /// The <see cref="ProfileType"/>.
        /// </returns>
        public static ProfileType Convert(CRUDServices.ProfileType dto)
        {
            return new ProfileType { ID = dto.ID, Name = dto.Name, Sector = ProfileSector.Convert(dto.Sector) };
        }

        #endregion
    }
}